{% extends "moban1788/base.html" %}
{% block main %}
    <div class="page-title cart-title">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12 text-center p-static">
                    <div class="page-heading">
                        <h2 class="white text-uppercase fz-36 ls-2">UI自动化日志</h2>
                        <h6 class="work-sans fz-15 white mt-20">首页 <span class="mlr-10"> / </span> 自动化日志</h6>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <section class="pt-150">
        <div class="container">
            <div class="row">
                <div class="col-md-12 text-center">
                    <h1 class="text-uppercase ls-3 bb gray-de"><span class="yellow"> UI</span> 自动化日志</h1>
                    <p class="mt-50 fz-15">
                        国内国际客户端UI自动化日志展示采集.
                    </p>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <br>
                    <form method='get'>
                        <div style="display: inline;">
                            <div class="col-sm-2">
                                <select name="platform" class="form-control" style="margin-top: -5%">
                                    <option value=0>平台</option>
                                    <option value=1>Android</option>
                                    <option value=2>Ios</option>
                                </select>
                            </div>
                            <div class="col-sm-2">
                                <select name="result" class="form-control" style="margin-top: -5%">
                                    <option value=6>结果</option>
                                    <option value=0>fail</option>
                                    <option value=1>success</option>
                                    <option value=2>manual</option>
                                </select>
                            </div>
                            <div class="col-sm-2">
                                <input class="input-sm" name="version" placeholder="请输入查询版本" style="margin-top: -3%">
                            </div>
                            <div class="col-sm-2">
                                <input type="submit" name="submit" id="submit" class='btn btn-info' value='查询'
                                       style="margin-top: -5%">
                            </div>
                        </div>
                        <br>
                        <br>
                    </form>

                    <table class="table my-cart no-margin" id="zdh">
                        <thead>
                        <tr>
                            <th class="col-md-1">平台</th>
                            <th class="col-md-1" style="text-align: center;">版本</th>
                            <th class="col-md-1">结果</th>
                            <th class="col-md-1">模块</th>
                            <th class="col-md-1">用例</th>
                            <th class="col-md-3">异常</th>
                            <th class="col-md-3">时间</th>
                            <th class="col-md-1">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {% for show in atclientlist.object_list %}
                            <tr {% if show.result == 0 %}class="danger"{% else %}class="active"{% endif %}>
                                <td>{{ show.platform }}</td>
                                <td>{{ show.version }}</td>
                                <td>{{ show.result_describe }}</td>
                                <td style="text-align: center; height: 15px">
                                    <div style="position:relative;width: 150px; word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
                                        {{ show.module }}
                                    </div>
                                </td>
                                <td>
                                    <div style="position:relative;width: 200px; word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
                                        {{ show.casename }}
                                    </div>
                                </td>
                                <td>{{ show.exception }}</td>
                                <div style="position:relative; word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
                                    <td style="text-align: center; height: 15px">{{ show.creatdate }}</td>
                                </div>
                                <td>
                                    <a href="../clientdetail/?id={{ show.id }}" style="font-size: 14px">查看详情</a>
                                </td>
                                {#                            </div>#}
                            </tr>
                        {% empty %}
                            <tr>
                                暂无数据
                            </tr>
                        {% endfor %}
                        </tbody>
                    </table>
                    <div class="row col-lg-12" style="text-align: center; margin-top: 2%">
                <span class="step-links">
                    <ul class="pager">
                        {% if atclientlist.has_previous %}
                            <li class="prev">
                                <a href="/qa/autocli/{{ url }}page={{ atclientlist.previous_page_number }}#zdh" class="previous"
                                   style="font-size: 14px">上一页</a>
                            </li>
                        {% endif %}
                        第 {{ atclientlist.number }}/{{ atclientlist.paginator.num_pages }} 页
                        {% if atclientlist.has_next %}
                            <li class="prev">
                                <a href="/qa/autocli/{{ url }}page={{ atclientlist.next_page_number }}#zdh" style="font-size: 14px">下一页</a>
                            </li>
                        {% endif %}
                        <li class="next"><a style="font-size: 14px">共{{ atclient.count }}条</a>
                    </ul>
                </span>
                    </div>
                </div>
            </div>
        </div>
        </div>
    </section>
{% endblock %}
{% block js %}
    <script src="../../../qa/static/js_new/jquery-1.12.4.min.js"></script>
    <script src="../../../qa/static/js_new/bootstrap.min.js"></script>
{% endblock %}